package com.ruoyi.client.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.client.mapper.SysPurOrderGoodsMapper;
import com.ruoyi.client.domain.SysPurOrderGoods;
import com.ruoyi.client.service.ISysPurOrderGoodsService;

/**
 * 订单商品信息 Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-09-14
 */
@Service
public class SysPurOrderGoodsServiceImpl implements ISysPurOrderGoodsService 
{
    @Autowired
    private SysPurOrderGoodsMapper sysPurOrderGoodsMapper;

    /**
     * 查询订单商品信息 
     * 
     * @param purGoodId 订单商品信息 主键
     * @return 订单商品信息 
     */
    @Override
    public SysPurOrderGoods selectSysPurOrderGoodsByPurGoodId(Long purGoodId)
    {
        return sysPurOrderGoodsMapper.selectSysPurOrderGoodsByPurGoodId(purGoodId);
    }

    /**
     * 查询订单商品信息 列表
     * 
     * @param sysPurOrderGoods 订单商品信息 
     * @return 订单商品信息 
     */
    @Override
    public List<SysPurOrderGoods> selectSysPurOrderGoodsList(SysPurOrderGoods sysPurOrderGoods)
    {
        return sysPurOrderGoodsMapper.selectSysPurOrderGoodsList(sysPurOrderGoods);
    }

    /**
     * 新增订单商品信息 
     * 
     * @param sysPurOrderGoods 订单商品信息 
     * @return 结果
     */
    @Override
    public int insertSysPurOrderGoods(SysPurOrderGoods sysPurOrderGoods)
    {
        return sysPurOrderGoodsMapper.insertSysPurOrderGoods(sysPurOrderGoods);
    }

    /**
     * 修改订单商品信息 
     * 
     * @param sysPurOrderGoods 订单商品信息 
     * @return 结果
     */
    @Override
    public int updateSysPurOrderGoods(SysPurOrderGoods sysPurOrderGoods)
    {
        return sysPurOrderGoodsMapper.updateSysPurOrderGoods(sysPurOrderGoods);
    }

    /**
     * 批量删除订单商品信息 
     * 
     * @param purGoodIds 需要删除的订单商品信息 主键
     * @return 结果
     */
    @Override
    public int deleteSysPurOrderGoodsByPurGoodIds(Long[] purGoodIds)
    {
        return sysPurOrderGoodsMapper.deleteSysPurOrderGoodsByPurGoodIds(purGoodIds);
    }

    /**
     * 删除订单商品信息 信息
     * 
     * @param purGoodId 订单商品信息 主键
     * @return 结果
     */
    @Override
    public int deleteSysPurOrderGoodsByPurGoodId(Long purGoodId)
    {
        return sysPurOrderGoodsMapper.deleteSysPurOrderGoodsByPurGoodId(purGoodId);
    }
}
